USE [AmazonMWS]
GO

/****** Object:  Table [con].[AmazonOrdersTotal]    Script Date: 11/08/2015 23:57:40 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [con].[AmazonOrdersTotal](
	[AmazonOrdersTotalID] [int] IDENTITY(1,1) NOT NULL,
	[SiteId] [int] NULL,
	[AccountInfoId] [int] NOT NULL,
	[AmazonOrderId] [nvarchar](20) NULL,
	[CurrencyCode] [nvarchar](20) NULL,
	[Amount] [decimal](18, 2) NULL,
	[IsDel] [bit] NULL,
	[CreateUser] [nvarchar](20) NULL,
	[CreateTime] [datetime] NULL,
	[UpdateUser] [nvarchar](20) NULL,
	[UpdateTime] [datetime] NULL,
PRIMARY KEY CLUSTERED 
(
	[AmazonOrdersTotalID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [con].[AmazonOrdersTotal] ADD  DEFAULT ((0)) FOR [IsDel]
GO

ALTER TABLE [con].[AmazonOrdersTotal] ADD  DEFAULT ('Pu') FOR [CreateUser]
GO

ALTER TABLE [con].[AmazonOrdersTotal] ADD  DEFAULT (getdate()) FOR [CreateTime]
GO

ALTER TABLE [con].[AmazonOrdersTotal] ADD  DEFAULT ('FL') FOR [UpdateUser]
GO

ALTER TABLE [con].[AmazonOrdersTotal] ADD  DEFAULT (getdate()) FOR [UpdateTime]
GO

